\documentclass{article}

\usepackage{agda}

\begin{document}

\begin{code}
{-# OPTIONS --allow-unsolved-metas #-}

latex : Set
latex = {!test!}
\end{code}
\end{document}
